package com.bigzero.workflow.common.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@NoArgsConstructor
public class UserInfo {

    private String code;
    private String name;
    private Integer isAdmin;

    public boolean isAdmin() {
        return isAdmin == 1;
    }

    public UserInfo(String code, String name, Integer isAdmin) {
        this.code = code;
        this.name = name;
        this.isAdmin = isAdmin;
    }
}
